-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add argument to qmk compile
to build compile_commands.json for you
#8916
Conversation
Looks like |
Hello, I‘d also enjoy to have the possibility to generate a compilation database to have a better support in Clion. I tried to use the scan_build and compiledb tools but they failed to intercept commands when building the firmware in MSYS2. |
Thanks for your work here! We'll want to have a separate command for this, rather than adding this into the compile command. In general we like to keep our commands small and focused. Can you rework this around that? We'll also want to find a better place than |
@skullydazed do you have any ideas about what the new command should be called? I'm struggling to find something that's both concise and specific enough. |
I don't have a good suggestion right now. I'll think on it. |
ptal @skullydazed I moved the feature into it's own command named I also merged the library code into the Also updated docs, moving the section on this command under the "developer" heading. |
I use parallel compilation for my builds, with output sync turned on. MAKEFLAGS="-j16 -O" qmk compiledb -kb massdrop/ctrl -km default If I do this, then the "make clean" stage of the For clarity, I'm "fixing" this by doing: MAKEFLAGS="" qmk compiledb -kb massdrop/ctrl -km default But for the uninitiated this will probably be hard to diagnose. |
@tzarc do you think there would be any downside to blanking out that (and other?) env vars in my |
@tzarc do you have some other environmental make settings enabled? I can't reproduce the hang you're seeing or understand why output-sync would cause it: when I invoke make clean I'm sending all output to /dev/null. But! Looking into this I noticed a different bug: I was hardcoding |
@xton - yes, invoking |
Thank you for your contribution! |
Thank you for your contribution! |
Description
I use clangd as a languageserver along with coc.vim[0]. It requires a compilation database[1] to help it figure out how to find all the required files for a given compilation pass. This PR adds a flag (
-c
) toqmk compile
which creates that for you. Now your dev environment can figure out what#include QMK_KEYBOARD_H
means.[0] https://github.com/neoclide/coc.nvim/wiki/Language-servers#ccobjective-c
[1] https://clang.llvm.org/docs/JSONCompilationDatabase.html
Types of Changes
Issues Fixed or Closed by This PR
Checklist